package com.zhuss.controller.${moudle};

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zhuss.bean.bo.${moudle}.${tablePkg}.Create${poEntity}Bo;
import com.zhuss.bean.bo.${moudle}.${tablePkg}.Delete${poEntity}Bo;
import com.zhuss.bean.bo.${moudle}.${tablePkg}.Update${poEntity}Bo;
import com.zhuss.common.BaseController;
import com.zhuss.common.OperateService;
import com.zhuss.${moudle}.${tablePkg}.${poEntity}OperateServiceExt;
import com.zhuss.exception.OceanException;


/**
 * @description: ${tableComment}操作的Controller
 * @author: zhushanshuo
 * @create: ${creatTime}
 **/
@RestController
@RequestMapping("/${poEntityLower}")
public class ${poEntity}OperateController extends BaseController {
	
	@Autowired
	@Qualifier("${poEntityLower}OperateService")
	private OperateService<Void, Object> ${poEntityLower}OperateService;
	
	@Autowired
	@Qualifier("${poEntityLower}OperateServiceExt")
	private ${poEntity}OperateServiceExt ${poEntityLower}OperateServiceExt;
	
	/**
	 * 创建
	 * @param bo
	 * @throws OceanException
	 */
	@ResponseBody
    @PostMapping("/create")
    public void create(@RequestBody Create${poEntity}Bo bo) throws OceanException {
		
		${poEntityLower}OperateService.create(bo);
    }
	
	
	/**
	 * 修改
	 * @param bo
	 * @throws OceanException
	 */
	@ResponseBody
    @PostMapping("/update")
    public void update(@RequestBody Update${poEntity}Bo bo) throws OceanException {
		
		${poEntityLower}OperateService.update(bo);
    }
	
	/**
	 * 删除
	 * @param bo
	 * @throws OceanException
	 */
	@ResponseBody
    @PostMapping("/delete")
    public void delete(@RequestBody Delete${poEntity}Bo bo) throws OceanException {
		
		${poEntityLower}OperateService.delete(bo);
    }
	
}
